package com.tian.controller;

import com.tian.annotation.LoginCheckAnnotation;
import com.tian.dto.req.RoleMenuReqDto;
import com.tian.service.RoleMenuService;
import com.tian.utils.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * {@code @description:} 角色权限管理控制器
 *
 * @author tianwc 公众号：Java后端技术全栈
 * 在线刷题 1200+java面试题和1000+篇技术文章：<a href="https://woaijava.cc/">博客地址</a>
 * {@code @date:} 2024-09-14 22:30
 * {@code @version:} 1.0
 */
@Slf4j
@RestController
@RequestMapping("/management/role/menu")
public class RoleMenuController {

    @Resource
    private RoleMenuService roleMenuService;

    @LoginCheckAnnotation
    @PostMapping("/add")
    public Result add(@RequestBody RoleMenuReqDto roleMenuReqDto) {
        log.info("roleMenuReqDto:{}", roleMenuReqDto);
        return roleMenuService.add(roleMenuReqDto);
    }
}
